﻿using PolyalphabeticSubstitutionCiphers.Modles;
namespace PolyalphabeticSubstitutionCiphers
{
    internal class program
    {

        static void Main(string[] args)
        {
            Code encrption = new Code();
            ///输入密钥并对对象数据成员实例化
            Console.WriteLine("输入一个密钥");
            string Key = Console.ReadLine();
            encrption.Key = Key;

            //输入明文转化为小写，对对象数据成员实例化
            Console.WriteLine("输入一段明文");
            //删除空格
            string Plaintext=Console.ReadLine().ToLower();
            Plaintext = Plaintext.Replace(" ","");
            encrption.Plaintext = Plaintext;
         
            //转换密文
            encrption.ConvertToCiphertext();
            //输出密文
            encrption.Output();
        
        }
        

    }
}



